package lab01;



public class Test05 {
    public static void main(String[] args) {
        int a=1,sum=0;
        for(a=1;a<=1000;a++){
           sum+=a;
        }
        System.out.println(sum);        //for语句

        int b=1;sum=0;
       while(b<=1000){
            sum+=b;
            b++;
        }
        System.out.println(sum);    //while语句


        int c=1;sum=0;
        do {
            sum+=c;
            c++;
        }
        while (c<=1000);
        System.out.println(sum);   //do while语句
    }
}
